﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace YArchitech.HVAC
{
	[Transaction(TransactionMode.Manual)]
	[Regeneration(RegenerationOption.Manual)]
	public class FanCoilSupportLoadCalculateCmd : IExternalCommand
	{
		Result IExternalCommand.Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
		{
			Document document = commandData.Application.ActiveUIDocument.Document;
			List<ViewType> list = new List<ViewType>();
			list.Add(1);
			list.Add(2);
			FrmLayFanCoilLoadCalculate frmLayFanCoilLoadCalculate = new FrmLayFanCoilLoadCalculate();
			if (frmLayFanCoilLoadCalculate.ShowDialog() == DialogResult.Cancel)
			{
				return Autodesk.Revit.UI.Result.Cancelled;
			}
			new FanCoilSupportLoadCalculate(document, frmLayFanCoilLoadCalculate).Excute();
			return Autodesk.Revit.UI.Result.Succeeded;
		}
	}
}
